package com.armani.service;

import com.armani.entity.Shopcar;
import com.armani.model.ShopCarModel;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @ClassName ShopcarService
 * @Description TODO
 * @Author Xinyibuzai
 * @Date 2021/11/29 14:13
 * @Version 1.0
 **/
public interface ShopcarService {
    /**
     * @MethodName listSearch
     * @Description TODO
     * @Param startRow
     * @Param limit
     * @Param name
     * @Return
     * @Author Xinyibuzai
     * @Date 2021/11/29
     **/
    List<Shopcar> listSearch(Integer startRow, Integer limit, Integer num);
    /**
     * @MethodName getCount
     * @Description TODO
     * @Param name
     * @Return
     * @Author Xinyibuzai
     * @Date 2021/11/29
     **/
    Integer getCount(Integer num);
    /**
     * @MethodName update
     * @Description TODO
     * @Param num
     * @Param userId
     * @Param skuId
     * @Param insertTime
     * @Param id
     * @Return
     * @Author Xinyibuzai
     * @Date 2021/11/29
     **/
    void update(Integer num, Integer userId, Integer skuId, Date insertTime,Integer id);
    /**
     * @MethodName insert
     * @Description TODO
     * @Param num
     * @Param userId
     * @Param skuId
     * @Param insertTime
     * @Return
     * @Author Xinyibuzai
     * @Date 2021/11/29
     **/
    void insert(Integer num, Integer userId, Integer skuId, Date insertTime);
    /**
     * @MethodName delete
     * @Description TODO
 * @Param id
     * @Return
     * @Author Xinyibuzai
     * @Date 2021/11/29
     **/
    void delete(Integer id);

    /**
     * 查询用户购物车
     * @param userId 用户id
     * @return 购物车列表
     */
    List<ShopCarModel> selectByUserId(Integer userId);

    /**
     * 修改购物车商品数量
     * @param params
     * @return 影响行
     */
    Integer editNum(Map<String, Object> params);
}
